package com.atguigu.juc.study.chapter05.interrupt;

/**
 * @author : leimingchao
 * @date Date : 2022年06月12日 17:28
 */
public class InterruptDemo6 {

    public static void main(String[] args) {

        System.out.println(Thread.currentThread().getName() + "\t" + Thread.interrupted());
        System.out.println(Thread.currentThread().getName() + "\t" + Thread.interrupted());
        System.out.println("-------------1");
        Thread.currentThread().interrupt();
        System.out.println("-------------2");
        System.out.println(Thread.currentThread().getName() + "\t" + Thread.interrupted());
        System.out.println(Thread.currentThread().getName() + "\t" + Thread.interrupted());

        //静态方法
        Thread.interrupted();

        //实例方法
        Thread.currentThread().interrupt();
    }
}
